Conversation
…sure Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [Security] Fix source maps deployment to prevent exposure of secrets
Disable source maps in production builds to prevent TypeScript source exposure
Mar 17, 2026
Contributor
numbers-official
left a comment
There was a problem hiding this comment.
Automated Code Review (Heartbeat Deep Check)
Reviewed 2 files changed (rollup.config.js, .github/workflows/production-release.yml). No regression risks, bugs, or security concerns found.
The approach is sound: conditionally disabling source maps based on MODE=prod keeps dev-time debugging intact while preventing TypeScript source exposure in production bundles. The workflow changes consistently set the environment variable across all three deployment jobs (GitHub Packages, NPM, S3/CDN).
LGTM from automated review — still requires human approval before merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Source maps were unconditionally generated and included in the npm package, making the original TypeScript source fully readable via jsDelivr CDN (
/npm/@numbersprotocol/capture-eye@latest/dist/capture-eye.bundled.js.map).Changes
rollup.config.js: Conditionally generate source maps based onMODEenv var — consistent with the pattern already used byweb-dev-server.config.jsandweb-test-runner.config.js:.github/workflows/production-release.yml: All three build jobs (publish-github,publish-npm,publish-s3) now invokeMODE=prod npm run build, ensuring no.js.mapfiles are produced or included in published artifacts.dev-release.yml(staging) is intentionally unchanged — the staging deploy script only uploads the.jsfile, and source maps remain useful there for debugging.Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.